package com.hfh.thread;

import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;

/**
 * @Author hfh
 * @Date 2022 09 15 20 18
 **/
public class Test3 implements Callable<String> {
    public static void main(String[] args) {
        FutureTask<String> ft = new FutureTask<>(new Test3());
        Thread t = new Thread(ft);
        t.start();
        System.out.println(t.getName());

    }

    @Override
    public String call() throws Exception {
        System.out.println("这是什么");
        return "第三种方式";
    }
}
